Scrolling Pop-Up Menus
With the advent of Pop-up Menus in Fireworks 4, users continue to stretch the boundaries of what they do with this feature. Fireworks MX provides many more customization settings, such as horizontal menus, menu item width and height controls, and other settings in the new Advanced tab of the Pop-up Menu Editor. For information on Pop-up Menus in Fireworks MX and the new features available to you, please read Jason Hanchey's DevNet article Fireworks MX Pop-up Menus.
This article is about how the community can work together to creatively meet challenges and provide solutions for users, enabling them to take their websites beyond the limitations of what the software can do "straight out of the box." I am just a middle man in this process.
As kids, we've all played with toys that teach us how to order a sequence of events, like stacking dominos or building a machine that allows you to start a process and watch that process run its course, correctly performing the designed task to our delight. These instructions are no different from that process. Hopefully you'll have fun using this tutorial.
Sites commonly use Pop-up Menu navigation in framesets to display the navigation system and content. This allows the navigation UI (User Interface) to load once in one frame while accessing the various pages on the site in another frame in the frameset. Two challenges can arise using this technique, one of which is discussed in the TechNotes How to open Pop-up Menus in another frame panel (TechNote 15816) for Fireworks 4 and How to make Pop-up Menus from Fireworks MX appear in a different frame (TechNote 16648), where you can make a menu in the navigation system appear in a frame other than the one where the navigation system displays. This commonly happens because navigation interfaces need to be compact and can be contained in small frames, but menus can vary in size—possibly requiring more screen real estate than what is available in the frame containing the navigation interface. The dynamic layers that contain the menus cannot appear over or across a frame border, but they can appear within a different frame by manipulating the code as described in the TechNotes mentioned above.
The second challenge arises when there is a sufficiently large amount of content displayed in the frame, which requires that the user scroll through the frame. This article shows how to make your menus move with the scrolling frame, so that a user can always access the navigation system from anywhere on the page.
Since the TechNotes listed above address the first challenge, I researched
ways to enable layer scrolling on web pages. In doing so, I became familiar
with Marja Ribbers-de Vroed's Persistent Layers extension. I attempted to get
the Fireworks code to work with Marja's code, but there was a hitch—it
didn't dynamically generate the menu layers and did not define or preset a <div
id>, which the Persistent
Layers JavaScript requires to enable JavaScript.
To accomplish this goal, I contacted Marja by e-mail and asked her if it were possible to alter the existing Persistent Layer JavaScript to enable the Pop-up Menus to scroll. She asked me to send her a small sample site and determined that a custom JavaScript would be a better way to work with this. Within a couple of days, she had a working example of a scrolling menu in a frameset.
We ran into a snag as we tested the extension in Netscape 4.x browser using the Fireworks MX code (the Fireworks 4 code was working fine). So I consulted with Andy Finnell, of the Macromedia Fireworks engineering team, to determine the changes in the menu code that affected and caused the problem in the Netscape browsers. Andy showed us a line of code in the mm_menu.js file and how to fix it so the Fireworks MX code could work in all browsers that support the Pop-up Menu JavaScript.
If you have enabled your Pop-up Menus to appear in a different frame in your frameset as described in the TechNotes mentioned above, you are ready to perform the steps below in the table of contents.
Table of Contents
- Change the Fireworks MX mm_menu.js file to enable the Fireworks MX menus to appear in Netscape 4.x browsers. (This step is not needed if you are using the Fireworks 4 fw_menu.js code.)
- Change
the call in the trigger events to initialize the
flevShowFramedFWPopupfunction - Insert
Marja's custom JavaScript into the
<script>area of the Navigation interface's HTML. - Insert
the calls to the external .js file and the
fwLoadMenus(Fireworks 4) ormmLoadMenus(Fireworks MX) function into each of the content frame pages. These instructions are included in the TechNotes referenced above. I've included snippets in the downloadable files to make it easy to insert the code. - Additional information about the function that you call and what parameters to pass.
Tip: When working between files on your site in full screen Code view in Dreamweaver on Windows, it's helpful to right-click on the tab at the bottom of the document window to access the Pop-up Menu where you can choose to save your file:

Figure 1. Right-click the tab for your file to access the Pop-up Menus for your page.
Requirements
To complete this tutorial, you will need the following:
Fireworks MX
Sample Files for this tutorial:
menu_scroller.zip (Windows 385 KB)
menu_scroller.sit (Macintosh 370 KB)
If you are familiar with Fireworks Pop-up Menus and using them in frames, proceed to the next page. If you're not familiar with them, read and use the following TechNotes and DevNet articles before proceeding:
- Jason Hanchey's DevNet article: Fireworks MX Pop-up Menus. Check out Troubleshooting Pop-up Menus in Fireworks (TechNote 18538) if you're having issues with your Pop-up Menus.
- Depending on your Fireworks version, either How to open Pop-up Menus in another frame panel (TechNote 15816) for Fireworks 4, or How to make Pop-up Menus from Fireworks MX appear in a different frame (TechNote 16648).
About the author
Mark Haynes is the Fireworks Product Team Liaison for Macromedia Customer Care. He has been active in supporting and promoting Fireworks since its creation in 1998 and has written many of the TechNotes in the Fireworks Support Center. Mark also has been involved with the Fireworks community through the Fireworks Online Forum as well as the Yahoo Fireworks Listserve.Submit feedback on our tutorials, articles, and sample applications.